
"""
s = '学习python编程是一种乐趣。'
print(s.lower())
print(s.upper())
print(s.find('python'))
print(s.replace('python','程序设计'))
print(s.startswith('学习'))
print(s.endswith('。'))
print('python' in s)
print(s[0])
print(s[2:8])
print(s + 'OK!')
print(s + 'OK!' * 5)
"""


"""
s1 ="hello python".center(50)
print(s1)

pos = "hello python".find('python')
print(pos)
s2 = '_'.join(['to','be','or','not','to','be'])
print(s2)
lst = s2.split('_')
print(lst)
s1 = s1.strip()
print(s1)
s2 =s2.replace('be','bee')
print(s2)
print(s1.upper())
print(s1.lower())
print(s1.capitalize())
print(s1.title())
print(s1.startswith('hell'))
print(s1.endswith('ton'))
print(s1.index('o'))
print(s1.rindex('o'))

"""



"""
s1 = "名称:{},单价:{},数量:{}".format('Apple',3.5,5)
print(s1)

s2 = "名称:{0},单价:{1},数量:{2}".format('Apple',3.5,5)
print(s2)
s3 = "{3} {0} {2} {1} {3} {0}".format("be","not","or","to")
print(s3)
s4 = "{name}大约是{value:.2f}。".format(value = 3.14,name = "PI")
print(s4)
height = 1.85
s5 = f"我的身高是{height}。"
print(s5)"""